import React, { Component } from 'react'
import { Modal, SlideModal } from './index'
import Button from './../button/button'
export default class ModalDemo extends Component {
  constructor (props) {
    super(props)
    this.state = {
      show: false
    }
  }
  onClick () {
    this.state.show = true
    this.setState({})
  }
  close () {
    this.state.show = false
    this.setState({})
  }
  render () {
    return (
      <div>
        <Button 
          type="primary"
          onClick={this.onClick.bind(this)}>打开</Button>
        <Modal
          type="slide"
          show={this.state.show}
          close={this.close.bind(this)}>
          <div slot="header">提示</div>
          <div slot="content">您的余额不足，请及时充值</div>
        </Modal>
        <SlideModal></SlideModal>
      </div>
    )
  }
}